<%@ Control Language="C#" AutoEventWireup="true" CodeFile="J_News_v1.ascx.cs" Inherits="Pub_Module_J_News_v1" %>

<script language="javascript" type="text/javascript" src="<%= ResolveClientUrl("~/")%>Pub/Js/JQ/jquery.rotator.js"></script>
<script language="javascript" type="text/javascript">
var Url='<%= ResolveClientUrl("~/")%>';

     LoadingAjax();
    $(window).load(function() {                                       
                        
                             LoadAjaxNews()
                    
      });           


function LoadAjaxNews()
{
    $.ajax({ 
                                   type: "GET", 
                                   url: "Pub/Ajax/AjaxQuery.aspx?type=GetNews_v1", 
                                   success: function(resp)
                                   { 
                                          $("#<%= divLoading.ClientID%>").hide();
                                          $("#<%= divData.ClientID%>").html(resp);                                          
                                          fnLoadNews();
                                   } 
             });     
}

function fnLoadNews()
{
    $(".Rotator_news").rotator({ms : 3000,n:20}); 

}

function LoadingAjax()         
{
    $(document).ready(function() {
        $('<div class="div-loading"></div>')
           
        .ajaxStart(function() 
        {
            $(this).show();
        }).ajaxStop(function() 
        {
            $(this).hide();
        });
    });

}     
</script>

<asp:Panel ID="divLoading" class="div-loading" runat="server" Style="background-color: #ffffff; width:100%; height:20px">
</asp:Panel>
<asp:Panel ID="divData" runat="server" style="text-align:center;">
</asp:Panel>
